using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FutureOpen.Web.Pages;
using FreeTextBoxControls;
using FutureOpen.Core.func.sql;

public partial class test_MyBlogNew : PageBase
{
    private int uid;
    protected void Page_Load(object sender, EventArgs e)
    {
        base.PageInit();
        if (IsLogin())
        {
            uid = MyUsr;
        }
    }
    protected void btBlodPublish_Click(object sender, EventArgs e)
    {
        if (IsLogin())
        {
            //FreeTextBox ftextbox = (FreeTextBoxControls.FreeTextBox)this.Page.Master.FindControl("MainContentPlaceHolder").FindControl("FreeTextBox1");
            string content = this.HtmlEditor1.Text;
            TopicProvider.AddBlog(tbBlogTitle.Text, content, uid);
            Response.Redirect("MyBlog.aspx");
        }
        else
        {
            GoBack();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("MyBlog.aspx");
    }
}
